package day03_oop_code.com.itheima.d12_objects;


import day03_oop_code.com.itheima.d11_object.Student;

import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        Student s1 = null;
        Student s2 = new Student("白骨精", 18, 90);

//        public static boolean equals(Object a, Object b ){
//            return (a == b) || (a != null && a.equals(b));
//        }
        System.out.println("s2.equals(s1) = " + s2.equals(s1));
        System.out.println("Objects.equals(s1, s2) = " + Objects.equals(s1, s2));
        System.out.println("Objects.isNull(s1) = " + Objects.isNull(s1));
        System.out.println("(s1 == null) = " + (s1 == null));
        System.out.println("(s2 == null) = " + (s2 == null));
    }
}
